#!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 题目：利用递归方法求5!。

def f1(n=5):
    a = [1]
    for i in range(2, n+1):
        a.append(a[-1])
        a[-1] *= i
    print(a[-1])


def f2(n=5):
    if n != 1:
        return n*f2(n-1)
    else:
        return 1


def f3():
    print(f2())


f = f3
if __name__ == "__main__":
    f()
